<script setup>
import {ref,defineEmits} from 'vue'
const props = defineProps({
  qr:String
})

const flag = ref(false)

const other = () => {
  flag.value = false
}

// 手机号登录
const emits = defineEmits(['outden']);
const phlogin = () =>{  
   
    emits('outden')
}
</script>
<template>
      <div class="scanning-box" v-if="flag">
        <div class="scanningcode">
          <img src="https://p5.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9643571155/525c/faac/2dc6/fe695c03c7c358ddaa4651736b26a55f.png" alt="">
        </div>
        <div class="code">
          <div class="code-title">扫码登录</div>
          <div class="code-png">
            <img :src="props.qr" alt="">
          </div>
          <div class="code-app">使用<span>网易云音乐APP</span>扫码登录</div>
        </div>
    </div>
    <div class="phone" v-else>
          <img src="https://p6.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9647707645/c8e7/4d8d/1895/6dff82b63181104bbac7cf3743c8b613.png" alt="" class="phing">
      
         <a  class="ph-login hot" @click='phlogin'>手机号登录</a>
         <a  class="ph-cz hot">注册</a>
        </div>
    <div class="other"  @click="other">选择其他登录模式</div>
</template>

<style lang="less" scoped>
.scanning-box {
  display: flex;
  justify-content: center;
    .scanningcode {
    width: 125px;
    height: 220px;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .code {
    margin-left: 25px;
    width: 200px;
    height: 214px;
    text-align: center;
    .code-title {
      font-size: 18px;
      color: #333333;
    }
    .code-png {
      height: 128px;
      width: 128px;
      margin: 13px auto;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .code-app {
      margin-top: 30px;
      font-size: 12px;
      color: rgba(0, 0, 0, 0.4);
      span {
        color: #0c73c2;
        padding: 0 4px;
      }
    }
  }
}
.other {
  width: 118px;
  height: 28px;
  margin: 20px auto 0;
  font-size: 12px;
  border: 1px solid #979797;
  border-radius: 15px;
  line-height: 24px;
  text-align: center;
  color: rgba(0, 0, 0, 0.8);
  &:hover {
    cursor: pointer;
  }
}
.phone {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  .phing {
    width: 224px;
    height: 120px;
  }

  .hot {
    margin-top: 10px;
    width: 224px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 12px;
    border-radius: 7px;
  }
  .ph-login {
    
    background: #4590d6;
    color: #fff;
    font-size: 12px;
    border-radius: 7px;
  }
  .ph-cz {
    background: #f7f7f7;
    color: #333333;
    border: 1px solid #c4c4c4;
  }
}
/deep/ .ant-modal-header{
  height: 38px;
  line-height: 38px;
  background-color: #2d2d2d;
  padding: 7px 24px;
}
/deep/ .ant-modal-title {
  font-size: 14px;
  color: #fff;
  font-weight: bold;
}
/deep/ .ant-modal-close-x {
  width: 10px;
  height: 10px;
  color: #888888;
  margin-right: 20px;
  margin-top: -8px;
  font-size: 14px;
}
</style>